home *** CD-ROM | disk | FTP | other *** search
/ Shareware Grab Bag / Shareware Grab Bag.iso / 011 / trun.arc / TRUN.DOC < prev   
Text File  |  1985-03-29  |  2KB  |  38 lines

  1. From Compuserve User: [74775,756]
  2. TRUN.PAS       10-Jan-85 1000          Accesses: 154
  3.  
  4.     Keywords: MS PC DOS EXEC CHILD PROCESSES EXAMPLE PROGRAM TURBORUN
  5.  
  6.     An example of a Turbo Pascal program that uses TURBORUN.COM to
  7.     "spawn" a child process.
  8.  
  9.  
  10. Additional notes by Allan Winston, 3/20/85:
  11.  
  12.     Warning: You must be very careful how you generate the COM file for
  13.     this program or any program you write that plans to use TURBORUN.COM.
  14.     Don't even think of performing a compile-and-go!
  15.     Instead, perform the following:
  16.     (a) Make sure that whatever procedure in your program is equated
  17.         to the external 'TURBORUN.COM' is the first procedure declared
  18.         in your program;  this assumption is critical to the success
  19.         of the assembler language code in its stack computations.
  20.     (b) Perform a memory compile (the default).
  21.     (c) Use the Options command to change from a memory compile to
  22.         a COM-file compile.  While still in the Options screen,
  23.         use the 'A' command to alter the mAximum free dynamic memory
  24.         size to a small value;  I recommend 400, which is the default
  25.         for the mInimum free dynamic memory size -- this will
  26.         correspond to 16K of memory.  Now exit the Options Screen.
  27.     (d) Perform another compile;  this will produce an executable
  28.         COM file.
  29.     (e) Now exit TURBO entirely.
  30.     (f) Whenever you wish, execute the COM file generated in step (d).
  31.  
  32.     The total overhead for TRUN.COM, assuming 400 was used for the 'A' value
  33.     in step (c) above, seems to be 28,400 bytes for TURBO PASCAL Version 2.
  34.  
  35.     The most common return code you will get running TRUN is 1026, which
  36.     correspond to file not found.  Remember to specify the '.EXE' or '.COM'
  37.     extension when specifying to program to execute.
  38.